package com.hzlx.results.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 质量检验结果明细（记录每个检验项目的详细数据）对象 mes_quality_inspection_results
 * 
 * @author ruoyi
 * @date 2025-07-01
 */
public class QualityInspectionResults extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 检验结果ID */
    private Long resultId;

    /** 关联的检验任务ID */
    @Excel(name = "关联的工单ID")
    private Long orderId;

    /** 检验项目ID */
    @Excel(name = "检验项目ID")
    private String itemId;

    /** 样本序号（同批次中的顺序号） */
    @Excel(name = "样本序号", readConverterExp = "同=批次中的顺序号")
    private Long sampleIndex;

    /** 实际检测值（数值/文本/照片等） */
    @Excel(name = "实际检测值", readConverterExp = "数=值/文本/照片等")
    private String actualValue;

    /** 单项判定结果（通过/不通过） */
    @Excel(name = "单项判定结果", readConverterExp = "通=过/不通过")
    private String result;

    /** 关联的缺陷类型ID（如NG时填写） */
    @Excel(name = "关联的缺陷类型ID", readConverterExp = "如=NG时填写")
    private String defectTypeId;

    /** 缺陷详细描述 */
    @Excel(name = "缺陷详细描述")
    private String defectDescription;

    /** 缺陷图片存储路径 */
    @Excel(name = "缺陷图片存储路径")
    private String defectImageUrl;

    /** 检验执行人员ID */
    @Excel(name = "检验执行人员ID")
    private String inspectorId;

    /** 检验执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "检验执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date inspectionTime;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setResultId(Long resultId) 
    {
        this.resultId = resultId;
    }

    public Long getResultId() 
    {
        return resultId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public void setItemId(String itemId)
    {
        this.itemId = itemId;
    }

    public String getItemId() 
    {
        return itemId;
    }

    public void setSampleIndex(Long sampleIndex) 
    {
        this.sampleIndex = sampleIndex;
    }

    public Long getSampleIndex() 
    {
        return sampleIndex;
    }

    public void setActualValue(String actualValue) 
    {
        this.actualValue = actualValue;
    }

    public String getActualValue() 
    {
        return actualValue;
    }

    public void setResult(String result) 
    {
        this.result = result;
    }

    public String getResult() 
    {
        return result;
    }

    public void setDefectTypeId(String defectTypeId) 
    {
        this.defectTypeId = defectTypeId;
    }

    public String getDefectTypeId() 
    {
        return defectTypeId;
    }

    public void setDefectDescription(String defectDescription) 
    {
        this.defectDescription = defectDescription;
    }

    public String getDefectDescription() 
    {
        return defectDescription;
    }

    public void setDefectImageUrl(String defectImageUrl) 
    {
        this.defectImageUrl = defectImageUrl;
    }

    public String getDefectImageUrl() 
    {
        return defectImageUrl;
    }

    public void setInspectorId(String inspectorId) 
    {
        this.inspectorId = inspectorId;
    }

    public String getInspectorId() 
    {
        return inspectorId;
    }

    public void setInspectionTime(Date inspectionTime) 
    {
        this.inspectionTime = inspectionTime;
    }

    public Date getInspectionTime() 
    {
        return inspectionTime;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("resultId", getResultId())
            .append("orderId", getOrderId())
            .append("itemId", getItemId())
            .append("sampleIndex", getSampleIndex())
            .append("actualValue", getActualValue())
            .append("result", getResult())
            .append("defectTypeId", getDefectTypeId())
            .append("defectDescription", getDefectDescription())
            .append("defectImageUrl", getDefectImageUrl())
            .append("inspectorId", getInspectorId())
            .append("inspectionTime", getInspectionTime())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
